3.229 \(\int \cos ^3(c+d x) (a \sin (c+d x)+b \tan (c+d x)) \, dx\)

Optimal. Leaf size=33 \[ -\frac{a \cos ^4(c+d x)}{4 d}-\frac{b \cos ^3(c+d x)}{3 d} \]

[Out]

-(b*Cos[c + d*x]^3)/(3*d) - (a*Cos[c + d*x]^4)/(4*d)

________________________________________________________________________________________

Rubi [A]  time = 0.0619245, antiderivative size = 33, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 4, integrand size = 26, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.154, Rules used = {4377, 12, 2565, 30} \[ -\frac{a \cos ^4(c+d x)}{4 d}-\frac{b \cos ^3(c+d x)}{3 d} \]

Antiderivative was successfully verified.

[In]

Int[Cos[c + d*x]^3*(a*Sin[c + d*x] + b*Tan[c + d*x]),x]

[Out]

-(b*Cos[c + d*x]^3)/(3*d) - (a*Cos[c + d*x]^4)/(4*d)

Rule 4377

Int[(u_)*((v_) + (d_.)*(F_)[(c_.)*((a_.) + (b_.)*(x_))]^(n_.)), x_Symbol] :> With[{e = FreeFactors[Cos[c*(a +
b*x)], x]}, Int[ActivateTrig[u*v], x] + Dist[d, Int[ActivateTrig[u]*Sin[c*(a + b*x)]^n, x], x] /; FunctionOfQ[
Cos[c*(a + b*x)]/e, u, x]] /; FreeQ[{a, b, c, d}, x] &&  !FreeQ[v, x] && IntegerQ[(n - 1)/2] && NonsumQ[u] &&
(EqQ[F, Sin] || EqQ[F, sin])

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 2565

Int[(cos[(e_.) + (f_.)*(x_)]*(a_.))^(m_.)*sin[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> -Dist[(a*f)^(-1), Subst[
Int[x^m*(1 - x^2/a^2)^((n - 1)/2), x], x, a*Cos[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n - 1)/2]
 &&  !(IntegerQ[(m - 1)/2] && GtQ[m, 0] && LeQ[m, n])

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rubi steps

\begin{align*} \int \cos ^3(c+d x) (a \sin (c+d x)+b \tan (c+d x)) \, dx &=a \int \cos ^3(c+d x) \sin (c+d x) \, dx+\int b \cos ^2(c+d x) \sin (c+d x) \, dx\\ &=b \int \cos ^2(c+d x) \sin (c+d x) \, dx-\frac{a \operatorname{Subst}\left (\int x^3 \, dx,x,\cos (c+d x)\right )}{d}\\ &=-\frac{a \cos ^4(c+d x)}{4 d}-\frac{b \operatorname{Subst}\left (\int x^2 \, dx,x,\cos (c+d x)\right )}{d}\\ &=-\frac{b \cos ^3(c+d x)}{3 d}-\frac{a \cos ^4(c+d x)}{4 d}\\ \end{align*}

Mathematica [A]  time = 0.0120894, size = 33, normalized size = 1. \[ -\frac{a \cos ^4(c+d x)}{4 d}-\frac{b \cos ^3(c+d x)}{3 d} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[c + d*x]^3*(a*Sin[c + d*x] + b*Tan[c + d*x]),x]

[Out]

-(b*Cos[c + d*x]^3)/(3*d) - (a*Cos[c + d*x]^4)/(4*d)

________________________________________________________________________________________

Maple [A]  time = 0.032, size = 29, normalized size = 0.9 \begin{align*} -{\frac{1}{d} \left ({\frac{ \left ( \cos \left ( dx+c \right ) \right ) ^{4}a}{4}}+{\frac{b \left ( \cos \left ( dx+c \right ) \right ) ^{3}}{3}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^3*(a*sin(d*x+c)+b*tan(d*x+c)),x)

[Out]

-1/d*(1/4*cos(d*x+c)^4*a+1/3*b*cos(d*x+c)^3)

________________________________________________________________________________________

Maxima [A]  time = 1.10022, size = 38, normalized size = 1.15 \begin{align*} -\frac{3 \, a \cos \left (d x + c\right )^{4} + 4 \, b \cos \left (d x + c\right )^{3}}{12 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3*(a*sin(d*x+c)+b*tan(d*x+c)),x, algorithm="maxima")

[Out]

-1/12*(3*a*cos(d*x + c)^4 + 4*b*cos(d*x + c)^3)/d

________________________________________________________________________________________

Fricas [A]  time = 0.487187, size = 69, normalized size = 2.09 \begin{align*} -\frac{3 \, a \cos \left (d x + c\right )^{4} + 4 \, b \cos \left (d x + c\right )^{3}}{12 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3*(a*sin(d*x+c)+b*tan(d*x+c)),x, algorithm="fricas")

[Out]

-1/12*(3*a*cos(d*x + c)^4 + 4*b*cos(d*x + c)^3)/d

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a \sin{\left (c + d x \right )} + b \tan{\left (c + d x \right )}\right ) \cos ^{3}{\left (c + d x \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**3*(a*sin(d*x+c)+b*tan(d*x+c)),x)

[Out]

Integral((a*sin(c + d*x) + b*tan(c + d*x))*cos(c + d*x)**3, x)

________________________________________________________________________________________

Giac [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: NotImplementedError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3*(a*sin(d*x+c)+b*tan(d*x+c)),x, algorithm="giac")

[Out]

Exception raised: NotImplementedError